Repository navigation
fix(android): keep callbacks on non-public base classes from R8 - #8657
Merged
Merged
Conversation
ItsChaceD
requested review from
a team,
OS-pedrogustavobilro,
OS-ruimoreiramendes,
alexgerardojacinto,
andredestro,
jcesarmobile,
markemer and
theproducer
and removed request for
a team
October 14, 2026 14:26
2 of 9 tasks
OS-pedrogustavobilro
approved these changes
Oct 14, 2026
OS-pedrogustavobilro
left a comment
Contributor
There was a problem hiding this comment.
Tested on Capacitor apps on AGP 8 and 9 with multiple plugins (including ones with permissions and activity callbacks), no crashes, all is working. Nice!
I'm leaving a non-blocker comment but approving the PR.
1 of 3 tasks
OS-pedrogustavobilro
approved these changes
Oct 15, 2026
riderx
pushed a commit
to Cap-go/capacitor-plus
that referenced
this pull request
Oct 16, 2026
…ferred conflicts)
alexgerardojacinto
approved these changes
Oct 21, 2026
riderx
pushed a commit
to Cap-go/capacitor-plus
that referenced
this pull request
Oct 22, 2026
…ferred conflicts)
jcesarmobile
approved these changes
Oct 22, 2026
riderx
pushed a commit
to Cap-go/capacitor-plus
that referenced
this pull request
Oct 23, 2026
…ferred conflicts)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a keep rule to core's
proguard-rules.profor@ActivityCallbackand@PermissionCallbackmethods on anyPluginsubclass. #8646 keeps the annotation types, but R8 still drops these callbacks when they're declared on a non-public base class.Tested on 8.5.3 with R8 on and
proguard-android-optimize.txt. With #8646 alone, an@ActivityCallbackon a package-private base class fails with "There is no ActivityCallback method registered". With this rule it resolves as with R8 off.Change Type
Rationale / Problems Fixed
https://outsystemsrd.atlassian.net/browse/RMET-5521
Platforms Affected
Notes
The Room and Firebase rules from the first version now ship in the plugins that need them, per review. Capacitor 9 gets the same rule in #8658.